# include <stdio.h>
int main()
{
	const float x=100000;
	float i=0,j=0;
	printf("enter\n");
	scanf("%f",&i);
	
	if (i<=100000)
		j=i*0.1;
	else if (i<=200000)
		j=(i-x)*0.075+(x*0.1);
	else if (i<=400000)
		j=(i-x*2)*0.05+(x*0.1)+(x*0.075);
	else if (i<=600000)
		j=(i-x*4)*0.03+(x*0.1)+(x*0.075)+(x*2*0.05);
	else if (i<=1000000)
		j=(i-x*6)*0.015+(x*0.1)+(x*0.075)+(x*2*0.05)+(x*2*0.03);
	else j=(i-x*10)*0.01+(x*0.1)+(x*0.075)+(x*2*0.05)+(x*2*0.03)+(x*4*0.015);
	printf("%f\n",j);
	return 0;
}

